package com.wpp.Test;


import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;

//标志这是一个切面类
@Aspect
public class MyPoint {

    //这是额外功能，切入点可以写在注解中
    @Around("execution(* *(..))")
    public Object pointOne(ProceedingJoinPoint joinPoint){

        System.out.println("方法之前");
        Object proceed = null;
        try {
            proceed = joinPoint.proceed();
        } catch (Throwable throwable) {
            throwable.printStackTrace();
        }

        System.out.println("方法之后");
        return proceed;
    }



}
